﻿using Abp.AspNetCore.Mvc.Controllers;
using Abp.Runtime.Validation;
using Batman.Cms.Controllers.Words.Input;
using Batman.Cms.Services.Words;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Batman.Cms.Controllers.Words
{
    public class StopWordListController : AbpController
    {
        public ActionResult Create()
        {
            return View();
        }

        public StopWordListAppSvc StopWordListAppSvc { get; set; }

        [DisableValidation]
        [HttpPost]
        public ActionResult Create(CreateStopWordInput model)
        {
            if (!ModelState.IsValid) return View(model);

            StopWordListAppSvc.ImportStopWordList(Request.Form.Files[0], model.Belong);

            return View();
        }
    }
}
